home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 1174 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.5 KB

  1. Subject: Re: load average patches for MiNT 1.10 + patches
  2. Date: Tue, 8 Mar 94 19:34:20 CET
  3. From: Juergen Lock <nox@jelal.north.de>
  4. In-Reply-To: <Up-ECGMAJAQ@asharak.apana.org.au>; from "michael smith" at Mar 6, 94 12:12 pm
  5. Message-Id: <9403081834.AA00176@jelal.north.de>
  6.  
  7. michael smith writes:
  8.  
  9. > In <memo.602717@cix.compulink.co.uk> you wrote :
  10. > >Ah but what I ment was,  with-in the vbl routine don't increment your own
  11. > >timer variable, but on startup take a snap shot of the _hz_200 var and
  12. > >calculate your effitice time from that, thus at most you will only be 1/50
  13. > >second out.
  14. > Yes, and the system will have a maximum lifetime of a little over 120 days.
  15. > (I know, it's not that stable _anyway_,
  16.  
  17.  oh don't say that, my patched 1.09 kernel was quite stable... :)  and
  18. i think 1.10 is getting there too. (i can only talk for me of course)
  19.  
  20. >  but I don't believe in that sort
  21. > of ceiling regardless of how it's implemented, and someone is _bound_ to harp
  22. > on it.)
  23.  
  24.  true.  thats also why you should always do timeouts checks like this
  25.  
  26.     unsigned tick = timer counter (like _hz_200) + time to wait;
  27.     for (...)
  28.         if (timer counter - tick > 0)  break;
  29.  
  30. instead of
  31.     ...
  32.         if (timer counter > tick)  break;
  33.  
  34. (and any compiler that `optimizes' the difference away should be shot. :)
  35.  
  36.  cheers
  37.     Juergen
  38.  
  39. PS: but don't worry, there are enough bugs of this kind in TOS too...
  40. -- 
  41. J"urgen Lock / nox@jelal.north.de / UUCP: ..!uunet!unido!uniol!jelal!nox
  42.                                 ...ohne Gewehr
  43. PGP public key fingerprint =  8A 18 58 54 03 7B FC 12  1F 8B 63 C7 19 27 CF DA 
  44.